<%@ page contentType="text/html;charset=UTF-8" language="java" %>

<script src="${js}/bootbox.js"></script>
<%@ include file="/WEB-INF/jsp/component/common.jsp" %>
<%@ include file="/WEB-INF/jsp/component/commonBottom.jsp" %>


<div id="slidebar">
    <ul class="slide_menu">
        <li>
            <div class="dashboard index">
                <a id="dashbord" href="#" title="${URL_LAYOUT}" rel="#">首页</a>
            </div>
        </li>

        <shiro:hasPermission name="sys:manager">
            <li>
                <div class="M02">系统管理</div>
                <span></span>
                <ul>
                    <li><a id="M021" href="#" title="${URL_SYS_USER_LIST}" rel="#">用户管理</a></li>
                    <li><a id="M022" href="#" title="${URL_SYS_MENU_LIST}" rel="#">菜单管理</a></li>
                    <li><a id="M023" href="#" title="${URL_SYS_ROLE_LIST}" rel="#">角色管理</a></li>
                    <li><a id="M024" href="#" title="${URL_SYS_CONFIG_LIST}" rel="#">参数管理</a></li>
                    <shiro:hasPermission name="super:role">
                        <li><a id="M025" href="#" title="${URL_EGN_LIST}" rel="#">代码生成</a></li>
                    </shiro:hasPermission>
                    <shiro:hasPermission name="brokerMessageLog:list">
                        <li><a id="M026" href="#" title="${URL_MESSAGE_LOG_LIST}" rel="#">数据追踪</a></li>
                    </shiro:hasPermission>
                </ul>
            </li>
        </shiro:hasPermission>

        <shiro:hasPermission name="Sample:list">
            <li>
                <div class="M02">基础设置</div>
                <span></span>
                <ul>
                    <li><a id="M081" href="#" title="${URL_TESTREFERENCEVALUE_TOTESTREFERENCEVALUE}" rel="#">相关参考值</a></li>
                    <li><a id="M082" href="#" title="${URL_TESTPROJECTITEM_TOTESTMGR}" rel="#">检测子项目</a></li>
                    <shiro:hasPermission name="testprojectkind:mgr">
                        <li><a id="M083" href="#" title="${URL_TESTPROJECTKIND_TOKINGMGR}" rel="#">检测项目种类</a></li>
                    </shiro:hasPermission>
                    <li><a id="M089" href="#" title="${URL_SERVICELOCATION_LIST}" rel="#">定位地址参照</a></li>
                </ul>
            </li>
        </shiro:hasPermission>

        <shiro:hasPermission name="instrument:manager">
            <li>
                <div class="M07">仪器管理</div>
                <span></span>
                <ul>
                   <%-- <li><a id="M091" href="#" onclick="showSrc('${URL_QULITITY_TODEVICE}')" rel="#">仪器查询</a></li>--%>
                    <li><a id="M071" href="#" title="${URL_QULITITY_TOINSTALL}" rel="#">装机设置</a></li>
                    <li><a id="M072" href="#" title="${URL_COMPANY_LIST}" rel="#">客户机构</a></li>
                    <li><a id="M073" href="#" title="${URL_INSTRUMENT_LIST}" rel="#">仪器监控</a></li>
                    <li><a id="M074" href="#" title="${URL_QULITITY_TOQULITITY}" rel="#">数据查看</a></li>
                        <%--<li><a id="M0104" href="#" onclick="showSrc('${URL_QULITITY_TOQULITITY}')" rel="#">数据推送</a></li>--%>
                </ul>
            </li>
        </shiro:hasPermission>

        <shiro:hasPermission name="hldoctor:top">
            <li>
                <div class="M03">医院管理</div>
                <span></span>
                <ul>
                    <shiro:hasPermission name="organi:mgr">
                        <li><a id="M031" href="#" title="${URL_SYS_TOORGANI}" rel="#">机构管理</a></li>
                    </shiro:hasPermission>
                    <shiro:hasPermission name="hlhospital:mgr">
                        <li><a id="M032" href="#" title="${URL_HL_TOHOSPITAL}" rel="#">医院管理</a></li>
                    </shiro:hasPermission>
                    <shiro:hasPermission name="hldoctor:mgr">
                        <li><a id="M033" href="#" title="${URL_HL_TODOCTOR}" rel="#">医生管理</a></li>
                    </shiro:hasPermission>
                    <shiro:hasPermission name="basedepartment:mgr">
                        <li><a id="M034" href="#" title="${URL_BASE_TODEPARTMENT}" rel="#">科室管理</a></li>
                    </shiro:hasPermission>
                    <shiro:hasPermission name="whospital:mgr">
                        <li><a id="M035" href="#" title="${URL_W_TOHOSPITAL}" rel="#">报告单医院管理</a></li>
                    </shiro:hasPermission>
                </ul>
            </li>
        </shiro:hasPermission>

        <shiro:hasPermission name="patient:manager">
            <li>
                <div class="M04">病人管理</div>
                <span></span>
                <ul>
                    <shiro:hasPermission name="patient:list">
                        <li><a id="M041" href="#"  title="${URL_PPPATIENTBASE_LIST}?diseasesType="" "  rel="#">病人档案</a></li>
                    </shiro:hasPermission>
                    <shiro:hasPermission name="docppapplication:list">
                        <li><a id="M042" href="#" title="${URL_DOCPPAPPLICATION_LIST}" rel="#">关注医生</a></li>
                    </shiro:hasPermission>
                    <li><a id="M114" href="#" title="${URL_COUNT_TOCOUNT}" rel="#">数据统计</a></li>
                </ul>
            </li>
        </shiro:hasPermission>

        <shiro:hasPermission name="patient:manager">
            <li>
                <div class="M10">高血压管理</div>
                <span></span>
                <ul>
                    <li><a id="M122" href="#" title="${URL_SCREENING_BPPATIENTS}?diseasesType=1" rel="#">高血压筛查</a></li>
                    <li><a id="M121" href="#" title="${URL_PATIENT_TODISEASESLIST}?diseasesType=1" rel="#">高血压档案</a></li>
                    <li><a id="M134" href="#" title="${URL_ACCOMPANY_BPPATIENTS}?diseasesType=1" rel="#">高血压随访</a></li>
                    <li><a id="M134" href="#" title="${URL_ACCOMPANY_BPREMINDS}?diseasesType=1" rel="#">随访提醒</a></li>
                    <li><a id="M123" href="#" title="${URL_QUESTIONNAIRE_TOPATIENTS}?type=1" rel="#">健康问卷</a></li>
                    <li><a id="M123" href="#" title="${URL_MONTHREPORT_TOBPPATIENTS}?type=1" rel="#">月度报告</a></li>
                </ul>
            </li>
        </shiro:hasPermission>

        <shiro:hasPermission name="patient:list">
            <li>
                <div class="M11">糖尿病管理</div>
                <span></span>
                <ul>
                    <li><a id="M132" href="#" title="${URL_SCREENING_BSPATIENTS}?diseasesType=2" rel="#">糖尿病筛查</a></li>
                    <li><a id="M131" href="#" title="${URL_PATIENT_TODISEASESLIST}?diseasesType=2" rel="#">糖尿病档案</a></li>
                    <li><a id="M135" href="#" title="${URL_ACCOMPANY_BSPATIENTS}?diseasesType=2" rel="#">糖尿病随访</a></li>
                    <li><a id="M135" href="#" title="${URL_ACCOMPANY_BSREMINDS}?diseasesType=2" rel="#">随访提醒</a></li>
                    <li><a id="M133" href="#" title="${URL_QUESTIONNAIRE_TOPATIENTS}?type=2"  rel="#">健康问卷</a></li>
                    <li><a id="M133" href="#" title="${URL_MONTHREPORT_TOBSPATIENTS}?type=2"  rel="#">月度报告</a></li>
                </ul>
            </li>
        </shiro:hasPermission>

        <shiro:hasPermission name="patient:list">
            <li>
                <div class="M12">高血脂管理</div>
                <span></span>
                <ul>
                    <li><a id="M132" href="#" title="${URL_PATIENT_TODISEASESLIST}?diseasesType=3" rel="#">高血脂档案</a></li>
                    <li><a id="M135" href="#" title="${URL_ACCOMPANY_BFPATIENTS}?diseasesType=3" rel="#">高血脂随访</a></li>
                    <li><a id="M135" href="#" title="${URL_ACCOMPANY_BFREMINDS}?diseasesType=3" rel="#">随访提醒</a></li>
                </ul>
            </li>
        </shiro:hasPermission>

        <shiro:hasPermission name="patient:list">
            <li>
                <div class="M13">骨松管理</div>
                <span></span>
                <ul>
                    <li><a id="M095" href="#" title="${URL_PATIENT_QIANHU_TODISEASESLIST}?diseasesType=4" rel="#">骨松档案(钱湖)</a></li>
                    <li><a id="M095" href="#" title="${URL_ACCOMPANY_QIANHU_BLPATIENTS}?diseasesType=4" rel="#">随访提醒(钱湖)</a></li>
                    <li><a id="M095" href="#" title="${URL_ACCOMPANY_QIANHU_BLPATIENT}?diseasesType=4" rel="#">骨松随访(钱湖)</a></li>
                    <li><a id="M095" href="#" title="${URL_BONELOOSE_QIANHU_BLPATIENTS}?diseasesType=4" rel="#">医疗服务(钱湖)</a></li>
                    <li><a id="M095" href="#" title="${URL_PATIENT_TODISEASESLIST}?diseasesType=4" rel="#">骨松档案</a></li>
                    <li><a id="M095" href="#" title="${URL_SCREENING_BLPATIENTS}?diseasesType=4" rel="#">骨松筛查</a></li>
                    <%--<li><a id="M095" href="#" title="${URL_BLONELOOSE_PATIENTS}?diseasesType=4" rel="#">基本档案</a></li>--%>
                    <%--<li><a id="M095" href="#" title="${URL_BLONELOOSE_CHECKPATIENTS}?diseasesType=4" rel="#">诊疗信息</a></li>--%>
                    <li><a id="M095" href="#" title="${URL_QUESTIONNAIRE_TOPATIENTS}?type=4" rel="#">健康问卷</a></li>
                    <li><a id="M095" href="#" title="${URL_ACCOMPANY_BLPATIENTS}?diseasesType=4" rel="#">骨松随访</a></li>
                    <li><a id="M095" href="#" title="${URL_ACCOMPANY_BLREMINDS}?diseasesType=4" rel="#">随访提醒</a></li>
                    <li><a id="M095" href="#" title="${URL_MiNIOUPLOAD_PAGE}?diseasesType=4" rel="#">检验照片上传</a></li>
                </ul>
            </li>
        </shiro:hasPermission>

        <shiro:hasPermission name="patient:list">
            <li>
                <div class="M13">失智老人</div>
                <span></span>
                <ul>
                    <li><a id="M095" href="#" title="${URL_PATIENT_TODISEASESLIST}?diseasesType=5" rel="#">失智老人档案</a></li>
<%--                    <li><a id="M095" href="#" title="${URL_SCREENING_BLPATIENTS}?diseasesType=5" rel="#">失智老人筛查</a></li>--%>
<%--                    <li><a id="M095" href="#" title="${URL_QUESTIONNAIRE_TOPATIENTS}?type=5" rel="#">健康问卷</a></li>--%>
<%--                    <li><a id="M095" href="#" title="${URL_ACCOMPANY_BLPATIENTS}?diseasesType=5" rel="#">随访</a></li>--%>
<%--                    <li><a id="M095" href="#" title="${URL_ACCOMPANY_BLREMINDS}?diseasesType=5" rel="#">随访提醒</a></li>--%>
                </ul>
            </li>
        </shiro:hasPermission>

        <shiro:hasPermission name="remote:manager">
            <li>
                <div class="M09">远程管理</div>
                <span></span>
                <ul>
                    <li><a id="M095" href="#" title="${URL_LOG_TOLOGMGR}" rel="#">日志信息</a></li>
                    <li><a id="M096" href="#" title="${URL_VERSION_TOVERSIONMGR}" rel="#">软件版本信息</a></li>
                    <li><a id="M097" href="#" title="${URL_VERSION_TOVERSIONNUMMGR}" rel="#">软件号管理</a></li>
                </ul>
            </li>
        </shiro:hasPermission>

        <shiro:hasPermission name="rent:list">
            <li>
                <div class="M08">家庭设备</div>
                <span></span>
                <ul>
                    <li><a id="M114" href="#" title="${URL_BASE_TOINSTRUMENTMGR}" rel="#">设备管理</a></li>
                    <li><a id="M111" href="#" title="${URL_RENT_TORENTMGR}" rel="#">租赁管理</a></li>
                    <li><a id="M112" href="#" title="${URL_RENT_TODUEREMIND}" rel="#">到期提醒</a></li>
                    <li><a id="M113" href="#" title="${URL_RENT_TOCOUNT}" rel="#">租赁统计</a></li>
                </ul>
            </li>
        </shiro:hasPermission>

        <%--<shiro:hasPermission name="rent:list">--%>
            <%--<li>--%>
                <%--<div class="M08">数据统计</div>--%>
                <%--<span></span>--%>
                <%--<ul>--%>

                <%--</ul>--%>
            <%--</li>--%>
        <%--</shiro:hasPermission>--%>
    </ul>
</div>
<script>
    $(function(){
        $(".slide_menu li ul").hide();
        $(".slide_menu li div").css({
            "cursor" : "pointer"
        })
        var aUl = $(".slide_menu li div");
        var flag = false;
        for( var a = 0 ; a < aUl.length; a++ ){
            $(aUl[a]).on("click",function(){
                var akids = $(this).siblings("ul");
                if( $(akids).css("display") === "none" ){
                    $(akids).slideDown("slow");
                }else if( $(akids).css("display") === "block" ){
                    $(akids).slideUp("slow");
                }
            })
        }
        var list = $('ul li a')
        for( var i = 0; i < list.length; i++ ){
            $(list[i]).on('click',function(){
                var  url = encodeURI($(this).attr('title'))
                var obj =[]
                obj.push(
                    {
                        name:$(this).parent().parent().parent().find('div').text(),
                        href:''
                    },{
                        name:$(this).text(),
                        href:($(this).attr('title'))
                    }
                )
                $.ajax({
                    url:'${URL_SCREENING_SAVEBREADLINE}',
                    data:{
                        breadLine:JSON.stringify(obj)
                    },
                    dataType:'json',
                    type:'post',
                    success:function(data){
                        showSrc(url)
                    }
                })
            })
        }
    })
</script>
